stubdom: warn about disabled features
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Apr 2008 14:46:52 +0000 (15:46 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Apr 2008 14:46:52 +0000 (15:46 +0100)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
tools/ioemu/vl.c
tools/ioemu/xenstore.c

index 1cbe3a99e4672f6112a688bc9a8955577e519365..fdd67c4b96fb640e68e872830850b67cdb9edecd 100644 (file)
@@ -1762,7 +1762,8 @@ static int store_dev_info(char *devName, int domid,
                           CharDriverState *cState, char *storeString)
 {
 #ifdef CONFIG_STUBDOM
-    return 0;
+    fprintf(logfile, "can't store dev %s name for domid %d in %s from a stub domain\n", devName, domid, storeString);
+    return ENOSYS;
 #else
     int xc_handle;
     struct xs_handle *xs;
index 01ace34ada2d6923520e33efc0e63b46b4569528..117cc3ea1f71a04c740a3bb9525d2065ca15c24a 100644 (file)
@@ -347,10 +347,6 @@ extern int vga_ram_size, bios_size;
 
 void xenstore_process_logdirty_event(void)
 {
-#ifdef CONFIG_STUBDOM
-    /* XXX we just can't use shm. */
-    return;
-#else
     char *act;
     static char *active_path = NULL;
     static char *next_active_path = NULL;
@@ -392,6 +388,12 @@ void xenstore_process_logdirty_event(void)
         /* Map the shared-memory segment */
         fprintf(logfile, "%s: key=%16.16llx size=%lu\n", __FUNCTION__,
                 (unsigned long long)key, logdirty_bitmap_size);
+
+#ifdef CONFIG_STUBDOM
+        /* XXX we just can't use shm. */
+        fprintf(logfile, "Log dirty is not implemented in stub domains!\n");
+        return;
+#else
         shmid = shmget(key, 2 * logdirty_bitmap_size, S_IRUSR|S_IWUSR);
         if (shmid == -1) {
             fprintf(logfile, "Log-dirty: shmget failed: segment %16.16llx "
@@ -417,6 +419,7 @@ void xenstore_process_logdirty_event(void)
             seg = NULL;
             return;
         }
+#endif
 
         /* Remember the paths for the next-active and active entries */
         if (pasprintf(&active_path, 
@@ -453,7 +456,6 @@ void xenstore_process_logdirty_event(void)
     /* Ack that we've switched */
     xs_write(xsh, XBT_NULL, active_path, act, len);
     free(act);
-#endif
 }